package org.sss.mapreduce.example;

import org.msgpack.annotation.Message;
import org.sss.mapreduce.datatype.Packable;

@Message
public class KMeansPoint implements Packable {
  public double x;
  public double y;

  public KMeansPoint() {}
  public KMeansPoint(double x, double y) {
    this.x = x;
    this.y = y;
  }

  @Override
  public int slot() {
    return ((new Double(x)).hashCode() + (new Double(y)).hashCode());
  }

  @Override
  public long getRoughSize() {
    return 16;
  }
}
